<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>simCreatePath</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1><a href="../apiOverview.htm">Regular API</a> function</h1>
<h3 class=subsectionBar><a name="simCreatePath" id="simCreatePath"></a>simCreatePath / sim.createPath </h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Creates a <a href="../paths.htm">path object</a>. See also <a href="simInsertPathCtrlPoints.htm">sim.insertPathCtrlPoints</a> and <a href="simCutPathCtrlPoints.htm">sim.cutPathCtrlPoints</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn>simInt simCreatePath(simInt attributes,const simInt* intParams,const simFloat* floatParams,const simFloat* color)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
<div><strong>attributes</strong>: a combination of <a href="../apiConstants.htm#pathObjectProperties">path properties</a>, or -1 for default attributes</div>
<div><strong>intParams (input)</strong>: nullptr for default values, or 3 integer values:</div>
<div class=tab>intParams[0]: line size of the path</div>
<div class=tab>intParams[1]: the path <a href="../apiConstants.htm#distanceCalculationMethods">length calculation method</a></div>
<div class=tab>intParams[2]: reserved. Set to 0</div>
<div><strong>floatParams (input)</strong>: nullptr for default values, or 3 float values:</div>
<div class=tab>floatParams[0]: control point size</div>
<div class=tab>floatParams[1]: the angular to linear conversion coefficient</div>
<div class=tab>floatParams[2]: the virtual distance scaling factor</div>
<div><strong>color (input)</strong>: pointer to 4x3 values representing the colors of the path (ambient_diffuse rgb, 3 reserved values (set to zero), specular rgb and emission rgb). Can be nullptr for default values</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div>-1 if operation was not successful, otherwise the handle of the newly created path</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>number pathHandle=sim.createPath(number attributes,table_3 intParams=nil,table_3 floatParams=nil,table_12 color=nil)<br></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div>Similar to the C-function counterpart</div>
<div></div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>Similar to the C-function counterpart</div>
<div></div>
</td> 
</tr> 
</table> 

<br>
<p><a href="../apiFunctions.htm">All regular API functions on one page</a></p>
<br>
<br>
</td>
</tr>
</table>
</div>
</body>
</html>
